<%--
  Created by IntelliJ IDEA.
  User: zhangyading
  Date: 2021/12/3
  Time: 21:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <title>视屏上传</title>

</head>

<body>
<div class="demo form-bg" style="padding: 20px 0;">
    <div class="container">
        <div class="row">
            <div class="col-md-offset-3 col-md-6">
                <%--上传视屏与普通文件有区别，属于内容较大。必须使用post方式提交--%>
                <%--上传文件，和普通文件有区别，action接收参数也会区别对待，所以声明表单为多部件表单--%>
                <form class="form-horizontal" action="upload" method="post" enctype="multipart/form-data">
                    <span class="heading">
                        小视屏上传
                    </span>
                    <div class="form-group">
                        <input type="file" name="fname" class="btn btn-warning">
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-default">提交</button>
                    </div>
                    <span style="color: blue">
                        <c:if test="${not empty fileSystem}">
                            文件上传成功<br/>
                            原文件名：${fileSystem.fileName}<br/>
                            上传后的路径： ${fileSystem.filePath}<br/>
                            <a href="http://www.fdfs.com/${fileSystem.fileId}" type="btn">查看文件</a>
                        </c:if>
                    </span>
                </form>
            </div>
        </div>
    </div>
</div>

</body>

</html>
